efscopy: No Ordinary Copy Utility

by Calvin Chinn


efscopy is one of the unsupported copy utilities in the SiliconáGraphics IRIX environment. However, efscopy has several characteristics that distinguish it from other such utilities. This article describes the features that underscore the usefulness of this utility.

What efscopy Can Do

efscopy

How You Can Use efscopy

Here are some practical applications of the efscopy utility:

efscopy Syntax

The syntax of efscopy is as follows:

	efscopy [-v] fromdev|fromfile todev [todev ...]
	
	or

	efscopy [-v] fromdev|fromfile tofile

You can also undo the operation by reversing the arguments.

The only option to efscopy is -v, which enables verbose mode. This option is useful because it provides a running status to the completion of the copy.

Using efscopy

Before using this utility, be sure to read the following:

To copy the contents of an option disk (including a system disk) to a file:

  1. Become root user.

  2. umount your option disk.

  3. Enter the following command:

    efscopy -v /dev/rdsk/{devicename} {filename}

    {devicename} is in the form of /dev/rdsk/dksAdBsC

    where:

    A is the option drive SCSI controller number

    B is the option drive SCSI unit number

    C is the option drive partition number of the entire disk

    For example:

    efscopy -v /dev/rdsk/dks0d2s7 optiondisk.efs

    Note the use of the raw device (also called character device) name with rdsk.

    After typing the command in stepá3, your workstation displays the following text:

    reading 9999 nodes..10%..20%...90%..done

    writing 99999 nodes..10%..20%...90%..done

    lastalloc/maximum=99999

    block delta -1

You have copied the entire contents of the option disk onto a single file. Preserve it like any other UNIX file; use it to restore any option disk drive to these same bits.

To reverse the process by copying from a file to a device:

Note: Ensure that the efscopy file is not larger (in bytes) than the disk drive that you are restoring.

  1. Become root user.

  2. umount the target disk.

  3. Enter the following command:

    mkfs {target-device-name}

  4. Enter the following command:

    mkfs -r {target-device-name}

    The two mkfs are needed because efscopy enforces strict requirements for usage. efscopy takes lost+found directory into account. The filesystem must be using 2áinodes (inode 2 for . and 3 for lost+found) and 21áblocks (1 for the . directory block and 20 for the lost+found directory block).

  5. Enter the following command:

    efscopy -v filename /dev/rdsk/{target-device-name}

    For example:

    efscopy -v /optiondisk.efs /dev/rdsk/dks0d2s7

    After typing the command in stepá5, your workstation displays the following text:

    
    reading 9999 nodes..10%..20%...90%..done
    
    writing 99999 nodes..10%..20%...90%..done
    
    lastalloc/maximum=99999
    
    block delta -1
    
    

    If you attempt to mount this filesystem, you will get a "dirty filesystem" message.

  6. Invoke fsck by entering one of the following commands:

    fsck {target-device-name}

    or

    mount -c to invoke fsck

    or

    reboot to invoke fsck

Terms, Utilities, and References

Summary

efscopy is an internal utility that Silicon Graphics wrote to facilitate its manufacturing operations. Silicon Graphics uses it in the production process to duplicate identical system disks for the workstation product line. The company also uses efscopy to copy data from a file to multiple devices in one command invocation. In addition to these applications, you can NFS mount a previously created efscopy file and copy it to a local target device.

You can obtain efscopy on Versioná5.1 of the Developer Toolbox CD. If you are an active member of the Silicon Graphics Developer Program, you should have already received this CD in your mail. Included with the efscopy executable script are equivalent file format copies in ASCII text (README) and hypertext Web form (index.html), which describe the same steps as discussed in this article. If you have any questions about efscopy, send an e-mail to devsupport@sgi.com.

You can also find efscopy at the following location on the Web version of the Developer Toolbox:

https://www.sgi.com/toolbox/utilities/efscopy/index.html

This Web site requires a user ID and password, which are distributed only to members of the Developer Program. To find out how you can access this Web site, send an e-mail to devprogram@sgi.com.



We welcome feedback and comments at devprogram@sgi.com.

Copyright ⌐ 1994, 1995 Silicon Graphics, Inc.